<%@page import="java.io.PrintWriter"%>
<%@page import="java.io.StringWriter"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>500错误</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<link href="${base}/resources/ace/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="${base}/resources/ace/css/font-awesome.min.css" />

<!--[if IE 7]>
		  <link rel="stylesheet" href="${base}/resources/ace/css/font-awesome-ie7.min.css" />
		<![endif]-->

<link rel="stylesheet" href="${base}/resources/ace/css/ace.min.css" />
<link rel="stylesheet" href="${base}/resources/ace/css/ace-rtl.min.css" />
<link rel="stylesheet" href="${base}/resources/ace/css/ace-skins.min.css" />

<!--[if lte IE 8]>
		  <link rel="stylesheet" href="${base}/resources/ace/css/ace-ie.min.css" />
		<![endif]-->

<script src="${base}/resources/ace/js/ace-extra.min.js"></script>
<!--[if lt IE 9]>
		<script src="${base}/resources/ace/js/html5shiv.js"></script>
		<script src="${base}/resources/ace/js/respond.min.js"></script>
		<![endif]-->
</head>

<body class="skin-1">
	<div class="navbar navbar-default" id="navbar">
		<script type="text/javascript">
			try {
				ace.settings.check('navbar', 'fixed')
			} catch (e) {
			}
		</script>

		<div class="navbar-container" id="navbar-container">
			<div class="navbar-header pull-left">
				<a href="#" class="navbar-brand"> <small> <i class="icon-leaf"></i> 500 ERROR
				</small>
				</a>
			</div>
		</div>
	</div>

	<div class="main-container" id="main-container">
		<script type="text/javascript">
			try {
				ace.settings.check('main-container', 'fixed')
			} catch (e) {
			}
		</script>

		<div class="main-container-inner">
			<a class="menu-toggler" id="menu-toggler" href="#"> <span class="menu-text"></span>
			</a>

			<div class="sidebar menu-min" id="sidebar">
				<script type="text/javascript">
					try {
						ace.settings.check('sidebar', 'fixed')
					} catch (e) {
					}
				</script>

				<div class="sidebar-shortcuts" id="sidebar-shortcuts">
					<div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
						<button class="btn btn-success">
							<i class="icon-signal"></i>
						</button>

						<button class="btn btn-info">
							<i class="icon-pencil"></i>
						</button>

						<button class="btn btn-warning">
							<i class="icon-group"></i>
						</button>

						<button class="btn btn-danger">
							<i class="icon-cogs"></i>
						</button>
					</div>

					<div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
						<span class="btn btn-success"></span> <span class="btn btn-info"></span> <span class="btn btn-warning"></span> <span class="btn btn-danger"></span>
					</div>
				</div>

				<div class="sidebar-collapse" id="sidebar-collapse">
					<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
				</div>

				<script type="text/javascript">
					try {
						ace.settings.check('sidebar', 'collapsed')
					} catch (e) {
					}
				</script>
			</div>

			<div class="main-content">
				<div class="breadcrumbs" id="breadcrumbs">
					<script type="text/javascript">
						try {
							ace.settings.check('breadcrumbs', 'fixed')
						} catch (e) {
						}
					</script>

					<ul class="breadcrumb">
						<li>500 Error</li>
					</ul>
				</div>

				<div class="page-content">
					<div class="row">
						<div class="col-xs-12">
							<div class="error-container">
								<div class="well">
									<h1 class="grey lighter smaller">
										<span class="blue bigger-125"> <i class="icon-random"></i> 500
										</span> Something Went Wrong
									</h1>

									<hr>
									<h3 class="lighter smaller">
										But we are working <i class="icon-wrench icon-animated-wrench bigger-125"></i> on it!
									</h3>

									<div class="space"></div>

									<div>
										<h4 class="lighter smaller">Meanwhile, try one of the following:</h4>

										<ul class="list-unstyled spaced inline bigger-110 margin-15">
											<li><i class="icon-hand-right blue"></i> Read the faq</li>
											<li><i class="icon-hand-right blue"></i> Give us more info on how this specific error occurred!</li>
											<li><i class="icon-hand-right blue"></i> 错误信息如下：<br /> <span style="color: red;font-weight: 800"></span><br /> <a
												href="javascript:showStack();" id="control">点击展开堆栈信息</a><br />
												<div id="stack" style="display: none">
													<%
														Exception e = (Exception)request.getAttribute("obj");
														StringWriter writer = new StringWriter();
														e.printStackTrace(new PrintWriter(writer));
													 %>
													 <%= 
													 	writer.toString()
													  %>
												</div></li>
										</ul>
									</div>

									<hr>
									<div class="space"></div>

									<div class="center">
										<a href="#" class="btn btn-grey"> <i class="icon-arrow-left"></i> Go Back
										</a> <a href="#" class="btn btn-primary"> <i class="icon-dashboard"></i> Dashboard
										</a>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> <i class="icon-double-angle-up icon-only bigger-110"></i>
		</a>
	</div>
	<!--[if !IE]> -->
	<script type="text/javascript">
		window.jQuery || document.write("<script src='${base}/resources/ace/js/jquery-2.0.3.min.js'>" + "<"+"/script>");
	</script>
	<!-- <![endif]-->
	<!--[if IE]>
		<script type="text/javascript">
		 window.jQuery || document.write("<script src='${base}/resources/ace/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
		</script>
	<![endif]-->
	<script type="text/javascript">
		if ("ontouchend" in document)
			document.write("<script src='${base}/resources/ace/js/jquery.mobile.custom.min.js'>" + "<"+"/script>");
	</script>
	<script src="${base}/resources/ace/js/bootstrap.min.js"></script>
	<script src="${base}/resources/ace/js/typeahead-bs2.min.js"></script>
	<script src="${base}/resources/ace/js/ace-elements.min.js"></script>
	<script src="${base}/resources/ace/js/ace.min.js"></script>
	<script type="text/javascript">
		function showStack() {
			var show = document.getElementById("stack").style.display == 'none' || document.getElementById("stack").style.display == 'NONE';
			if (show) {
				document.getElementById("stack").style.display = 'block';
				document.getElementById("control").innerHTML = "点击隐藏堆栈信息";
			}else {
				document.getElementById("stack").style.display = 'none';
				document.getElementById("control").innerHTML = "点击展开堆栈信息";
			}
		}
	</script>
</body>
</html>
